package entities;

import java.io.Serializable;

public class EvaluationReportStage implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private Long ticketId;
	private User evaluator;
	// Strings representing different timestamps of the evaluation stage
	private String approveDate;				// date the evaluator was approved by the inspector
	private Integer durationDays;			// due date for the evaluation stage, requested by the evaluator
	private String durationApproveDate;		// date the inspector approved the requested time length requested by the evaluator
	private String durationDate;			// once the inspector approved the duration time its being calculated to a date
	private String completeDate;			// date in which the evaluation stage has completed
	// Strings representing fields in the report itself
	private String changeDescreption;       // location and the full description of the change to be made
	private String resultDescription;       // description of the expected result
	private String limitationsDescription;  // descriptive paragraph about any limitation that may be caused by the change
	private String risksDescriptions;		// description of any potential risks that may formed as a result of the change
	private String totalDurationDate;		// total time for handling the ticket
	
	public EvaluationReportStage(Long ticketId, String changeDescreption, String resultDescription, String limitationsDescription, String risksDescriptions, String totalDurationDate) {
		this.ticketId = ticketId;
		this.changeDescreption = changeDescreption;
		this.resultDescription = resultDescription;
		this.limitationsDescription = limitationsDescription;
		this.risksDescriptions = risksDescriptions;
		this.totalDurationDate = totalDurationDate;
	}

	public EvaluationReportStage() {}

	/**
	 * Returns the ticket's serial number
	 * @return Long ticketID
	 */
	public Long getTicketId() {
		return ticketId;
	}

	/**
	 * Set a reference of the ticket ID number
	 * @param ticketId
	 */
	public void setTicketId(Long ticketId) {
		this.ticketId = ticketId;
	}

	/**
	 * Returns the ticket's appointed evaluator
	 * @return User evaluator
	 */
	public User getEvaluator() {
		return evaluator;
	}

	/**
	 * Set the evaluator for this ticket. Must be done by the ticket's inspector.
	 * @param evaluator
	 */
	public void setEvaluator(User evaluator) {
		this.evaluator = evaluator;
	}

	/**
	 * Returns the date the evaluator was approved by the inspector
	 * @return String approved date
	 */
	public String getApproveDate() {
		return approveDate;
	}

	/**
	 * Set the date the evaluator was approved by the inspector
	 * @param approveDate
	 */
	public void setApproveDate(String approveDate) {
		if(approveDate == null)
			this.approveDate = "";
		else
			this.approveDate = approveDate;
	}

	/**
	 * Returns the due date for the evaluation stage, requested by the evaluator
	 * @return Integer duration in days
	 */
	public Integer getDurationDays() {
		return durationDays;
	}

	/**
	 * Set the due date for the evaluation stage, requested by the evaluator
	 * @param days Integer
	 */
	public void setDurationDays(Integer days) {
		if(days == null)
			this.durationDays = 0;
		else
			this.durationDays = days;
	}
	
	/**
	 * Returns the date the inspector approved the requested time length requested by the evaluator
	 * @return String date
	 */
	public String getDurationApproveDate() {
		return durationApproveDate;
	}

	/**
	 * Set the date the inspector approved the requested time length requested by the evaluator
	 * @param durationApproveDate
	 */
	public void setDurationApproveDate(String durationApproveDate) {
		if(durationApproveDate == null)
			this.durationApproveDate = "";
		else
			this.durationApproveDate = durationApproveDate;
	}

	/**
	 * Returns the evaluation stage duration date 
	 * @return String 
	 */
	public String getDurationDate() {
		return durationDate;
	}

	/**
	 * Set the evaluation stage duration date
	 * @param durationDate String
	 */
	public void setDurationDate(String durationDate) {
		if(durationDate == null)
			this.durationDate = "";
		else
			this.durationDate = durationDate;
	}

	/**
	 * Returns a date in which the evaluation stage has completed
	 * @return String
	 */
	public String getCompleteDate() {
		return completeDate;
	}

	/**
	 * Set a date in which the evaluation stage has completed
	 * @param completeDate String
	 */
	public void setCompleteDate(String completeDate) {
		if(completeDate == null)
			this.completeDate = "";
		else
			this.completeDate = completeDate;
	}

	/**
	 * Returns the location and the full description of the change to be made
	 * @return String
	 */
	public String getChangeDescreption() {
		return changeDescreption;
	}

	/**
	 * Set the location and the full description of the change to be made
	 * @param changeDescreption
	 */
	public void setChangeDescreption(String changeDescreption) {
		if(changeDescreption == null)
			this.changeDescreption = "";
		else
			this.changeDescreption = changeDescreption;
	}

	/**
	 * Return a description of the expected result
	 * @return String
	 */
	public String getResultDescription() {
		return resultDescription;
	}

	/**
	 * Set a description of the expected result
	 * @param resultDescription
	 */
	public void setResultDescription(String resultDescription) {
		if(resultDescription == null)
			this.resultDescription = "";
		else
			this.resultDescription = resultDescription;
	}

	/**
	 * Returns a paragraph about any limitation that may be caused by the change
	 * @return String
	 */
	public String getLimitationsDescription() {
		return limitationsDescription;
	}

	/**
	 * Set a paragraph about any limitation that may be caused by the change
	 * @param limitationsDescription
	 */
	public void setLimitationsDescription(String limitationsDescription) {
		if(limitationsDescription == null)
			this.limitationsDescription = "";
		else
			this.limitationsDescription = limitationsDescription;
	}

	/**
	 * Returns a description of any potential risks that may formed as a result of the change
	 * @return String
	 */
	public String getRisksDescriptions() {
		return risksDescriptions;
	}

	/**
	 * Set a description of any potential risks that may formed as a result of the change
	 * @param risksDescriptions
	 */
	public void setRisksDescriptions(String risksDescriptions) {
		if(risksDescriptions == null)
			this.risksDescriptions = "";
		else
			this.risksDescriptions = risksDescriptions;
	}
	
	/**
	 * Returns the ticket's overall duration
	 * @return String
	 */
	public String getTotalDurationDate() {
		return totalDurationDate;
	}

	/**
	 * Set the ticket's overall duration
	 * @param totalDurationDate
	 */
	public void setTotalDurationDate(String totalDurationDate) {
		if(totalDurationDate == null)
			this.totalDurationDate = "";
		else
			this.totalDurationDate = totalDurationDate;
	}

}
